package lp.xian.equipment.service.impl;

import com.ruoyi.common.utils.DateUtils;
import lp.xian.equipment.domain.Classify;
import lp.xian.equipment.mapper.ClassifyMapper;
import lp.xian.equipment.service.IClassifyservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/*
*供应商分类
*
* */
@Service
public class ClassifyserviceImpl implements IClassifyservice {
    @Autowired
    private ClassifyMapper classifyMapper;
    @Override
    public int save(Classify classify) {
        classify.setCreateTime(DateUtils.getNowDate());
        return classifyMapper.save(classify);
    }

    @Override
    public int deletees(Integer[] classifyIds) {
        return classifyMapper.deletees(classifyIds);
    }

    @Override
    public int delete(Integer classifyId) {
        return classifyMapper.delete(classifyId);
    }

    @Override
    public List<Classify> listClassify(Classify classify) {
        return classifyMapper.listClassify(classify);
    }

    @Override
    public Classify getByIdClassify(Integer classifyId) {
        return classifyMapper.getByIdClassify(classifyId);
    }

    @Override
    public int update(Classify classify) {
        classify.setUpdateTime(DateUtils.getNowDate());
        return update(classify);
    }
}
